package com.ibigcat.module.mdm.dao.mapper;

import java.util.*;

import com.ibigcat.framework.common.pojo.PageResult;
import com.ibigcat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.ibigcat.framework.mybatis.core.mapper.BaseMapperX;
import com.ibigcat.module.mdm.dao.entity.CustomerSetGroupDO;
import org.apache.ibatis.annotations.Mapper;
import com.ibigcat.module.mdm.controller.admin.customersetgroup.vo.*;

/**
 * 客户组明细 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CustomerSetGroupMapper extends BaseMapperX<CustomerSetGroupDO> {

    default PageResult<CustomerSetGroupDO> selectPage(CustomerSetGroupPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CustomerSetGroupDO>()
                .eqIfPresent(CustomerSetGroupDO::getGroupCode, reqVO.getGroupCode())
                .eqIfPresent(CustomerSetGroupDO::getCustomerCode, reqVO.getCustomerCode())
                .betweenIfPresent(CustomerSetGroupDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CustomerSetGroupDO::getId));
    }

}